﻿@{
    ViewData["Title"] = "Home Page";
}

@section Header
    {
    <style>
        .kit-layout-admin .layui-logo {
            font-weight: normal;
            font-family: "微软雅黑";
            text-shadow: none;
        }

        .layui-layout-admin .layui-header,
        .layui-header .layui-nav .layui-nav-item,
        .layui-bg-black,
        .kit-side .layui-side-scroll .kit-side-fold {
            background: #2a689b !important;
        }

        .kit-layout-admin .layui-logo {
            color: #fff;
        }

        .layui-nav .layui-nav-item {
            background: #387cb4;
        }

        .kit-side .layui-nav-tree .layui-nav-child a {
            background: #5495ca !important;
        }

        .layui-nav-tree .layui-nav-item a:hover,
        .kit-side .layui-nav-tree .layui-nav-child .layui-this a {
            background: #f3966f !important;
        }

        .layui-nav .layui-nav-item a {
            color: #fff !important;
        }

        .layui-logo {
            width: auto;
            white-space: nowrap;
        }
    </style>
}
@section Scripts
    {
    <script type="text/javascript">
        var message;
        layui.config({
            base: '/js/src/js/',
            version: '1.0.1'
        }).use(['app', 'message'], function () {
            var app = layui.app,
                $ = layui.jquery, layer = layui.layer;

            var roleName = localStorage.getItem("X-NAME");
            var roleId = localStorage.getItem("X-ROLE");
            var userUrl = localStorage.getItem("X-UserUrl");
            console.log("1234" + userUrl);
            if (userUrl != 'null')
                $("#imageId").attr("src", userUrl)

            $("#userName").text(roleName);

            if (roleName == null || roleId == null)
                location.href = '/Login/Login';

            axios({
                url: "/Home/UserMenu",
                method: 'get',
                params: {
                    "roleId": roleId
                }
            })
                .then(function (response) {
                    console.log(response);
                    console.log(response.data);

                    if (response.data.code == 200) {
                        var dataL = response.data.result.data;
                        menushow(dataL);
                    }
                    else {
                        layer.confirm("菜单加载失败!请刷新" + response.data.msg)
                    }
                })
                .catch(function (error) {
                    layer.confirm("菜单加载失败!")
                    console.log(error)
                });


            function menushow(data) {
                for (var i = 0; i < data.length; i++) {
                    $("#" + data[i].muCode).show();
                }
            }


            //退出登陆
            $("#quit").bind("click", function () {
                localStorage.removeItem("X-TOKEN");
                localStorage.removeItem("X-NAME");
                localStorage.removeItem("X-ROLE");
                localStorage.removeItem("X-AreCode");
                localStorage.removeItem("X-RoleName");
                location.href = '/Login/Login';
            });

            //将message设置为全局以便子页面调用
            message = layui.message;
            //主入口
            app.set({
                type: 'iframe'
            }).init();
            $('dl.skin > dd').on('click', function () {
                var $that = $(this);
                var skin = $that.children('a').data('skin');
                switchSkin(skin);
            });
        });

        layui.use(['element', 'jquery'], function () {
            var element = layui.element, $ = layui.jquery;
            $("ol").on("click", "li a", function () {
                $.each($(this).parent().siblings(), function (i, e) {
                    $(e).find("a").removeClass('three_this');
                });
                $(this).addClass('three_this'); // 添加当前元素的样式
            });
        });
    </script>
}
<div class="layui-layout layui-layout-admin kit-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">
            <a href=""><img src="~/Images/logo.png" width="50" height="50" /></a> &nbsp;&nbsp;
            全国鳄鱼及其产品标识管理系统
        </div>
        <!-- 天气信息 -->
        <div style="color: #fff; float:right; margin: 15px 0 0 50px; margin-right: 220px;">
            <div id="tp-weather-widget"></div>
            <script>(function (T, h, i, n, k, P, a, g, e) { g = function () { P = h.createElement(i); a = h.getElementsByTagName(i)[0]; P.src = k; P.charset = "utf-8"; P.async = 1; a.parentNode.insertBefore(P, a) }; T["ThinkPageWeatherWidgetObject"] = n; T[n] || (T[n] = function () { (T[n].q = T[n].q || []).push(arguments) }); T[n].l = +new Date(); if (T.attachEvent) { T.attachEvent("onload", g) } else { T.addEventListener("load", g, false) } }(window, document, "script", "tpwidget", "//widget.seniverse.com/widget/chameleon.js"))</script>
            <script>
                tpwidget("init", {
                    "flavor": "slim",
                    "location": "WX4FBXXFKE4F",
                    "geolocation": "enabled",
                    "language": "auto",
                    "unit": "c",
                    "theme": "chameleon",
                    "container": "tp-weather-widget",
                    "bubble": "disabled",
                    "alarmType": "badge",
                    "color": "#FFFFFF",
                    "uid": "UCE89E9EBF",
                    "hash": "8850fd79cb498408f6b6a0e9b00742e0"
                });
                tpwidget("show");
            </script>
        </div>
        <ul class="layui-nav layui-layout-right kit-nav">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    @*<img src="~/images/denglutoux.png" id="imageId" class="layui-nav-img" />*@
                    <label id="userName"></label>
                </a>
                <dl class="layui-nav-child">
                    @*<dd><a href="javascript:;" style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" kit-target data-options="{url:'/Manage/AdminUser/MyInfo',icon:'&#xe658;',title:'基本资料',id:'966'}"><span>基本资料</span></a></dd>*@
                    <dd><a href="javascript:;" style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" kit-target data-options="{url:'/User/PersonalInformationEdit',icon:'&#xe658;',title:'修改密码',id:'967'}"><span>修改密码</span></a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" id="quit"><a><i class="fa fa-sign-out" aria-hidden="true"></i>退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black kit-side">
        <div class="layui-side-scroll">
            <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
            <!-- 左侧导航区域（可配合layui已有的垂直导航） style="display:none;" -->
            <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                <li class="layui-nav-item " id="jcsj" style="display:none;">
                    <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>基础信息管理</span></a>
                    <dl class="layui-nav-child">
                        <dd id="jcsj_yhgl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/User/List',title:'用户管理',id:'01'}"><span>用户管理</span></a>
                        </dd>
                        <dd id="jcsj_jsgl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Role/List',title:'角色管理',id:'02'}"><span>角色管理</span></a>
                        </dd>
                        <dd id="jcsj_qygl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Enterprise/List',title:'企业管理',id:'03'}"><span>企业管理</span></a>
                        </dd>
                        <dd id="jcsj_qugl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Area/List',title:'区域管理',id:'04'}"><span>区域管理</span></a>
                        </dd>
                        <dd id="jcsj_cpgl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SpeciesManage/List',title:'产品管理',id:'05'}"><span>产品管理</span></a>
                        </dd>
                        <dd id="jcsj_cdgl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Menu/List',title:'菜单管理',id:'06'}"><span>菜单管理</span></a>
                        </dd>
                        <dd id="jcsj_sjzd" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Dictionary/List',title:'数据字典',id:'07'}"><span>数据字典</span></a>
                        </dd>
                    </dl>
                </li>
                @*<li class="layui-nav-item " id="xtsz">
                        <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>系统设置</span></a>
                        <dl class="layui-nav-child">
                            <dd id="xtsz_gggl">
                                <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/MarketPrice/List',title:'市场报送',id:'11'}"><span>系统公告管理</span></a>
                            </dd>
                            <dd id="xtsz_xtrz">
                                <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/MarketPrice/DailyList',title:'市场品种价格分析',id:'12'}"><span>系统日志管理</span></a>
                            </dd>
                        </dl>
                    </li>*@
                <li class="layui-nav-item" id="qtba" style="display:none;">
                    <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>企业信息管理</span></a>
                    <dl class="layui-nav-child">
                        <dd id="qtba_bagl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Enterprise/List',title:'企业备案',id:'21'}"><span>企业备案</span></a>
                        </dd>
                        <dd id="qtba_xczl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Enterprise/MediaList',title:'企业宣传资料',id:'22'}"><span>企业宣传资料</span></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item " id="bsgl" style="display:none;">
                    <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>标识申请管理</span></a>
                    <dl class="layui-nav-child">
                        <dd id="bsgl_bssq" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/List',title:'标识牌申请',id:'31'}"><span>标识牌申请</span></a>
                        </dd>
                        <dd id="bsgl_bscs" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/ListOne',title:'标识牌初审',id:'32'}"><span>标识牌初审</span></a>
                        </dd>
                        <dd id="bsgl_bsfs" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/ListTwo',title:'标识牌复审',id:'33'}"><span>标识牌复审</span></a>
                        </dd>
                        @*<dd id="bsgl_bspf" style="display:none;">
                                <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/AllotmentList',title:'标识牌配发',id:'34'}"><span>标识牌配发</span></a>
                            </dd>*@
                    </dl>
                </li>
                <li class="layui-nav-item " id="bspfgl" style="display:none;">
                    <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>标识配发管理</span></a>
                    <dl class="layui-nav-child">
                        <dd id="bspfgl_bsdr" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/LogoStock/List',title:'标识牌库存',id:'61'}"><span>标识牌库存</span></a>
                        </dd>
                        <dd id="bspfgl_bspf" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/AllotmentList',title:'标识牌配发',id:'62'}"><span>标识牌配发</span></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item " id="bsjh" style="display:none;">
                    <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>标识管理</span></a>
                    <dl class="layui-nav-child">
                        <dd id="bsjh_bsgl" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/AllotmentQuire',title:'标识牌列表',id:'42'}"><span>标识牌列表</span></a>
                        </dd>
                        <dd id="bsjh_bssm" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SignageApplication/ActivationList',title:'标识牌激活',id:'43'}"><span>标识牌激活</span></a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item " id="hzfx" style="display:none;">
                    <a href="javascript:;"><i class="fa fa-cog fa-fw" aria-hidden="true"></i><span>汇总分析</span></a>
                    <dl class="layui-nav-child">
                        <dd id="hzfx_qyhz" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/Area/AreaDailyList',title:'区域汇总分析',id:'51'}"><span>区域汇总分析</span></a>
                        </dd>
                        <dd id="hzfx_cplx" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SummaryReport/SpeciesManageList',title:'产品类型汇总分析',id:'54'}"><span>产品类型汇总分析</span></a>
                        </dd>
                        <dd id="hzfx_qehz" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SummaryReport/EnterpriseList',title:'企业汇总分析',id:'52'}"><span>企业汇总分析</span></a>
                        </dd>
                        <dd id="hzfx_bqhz" style="display:none;">
                            <a style="background: rgb(22, 112, 168);color:white;border-bottom: 1px solid #ccc;" href="javascript:;" kit-target data-options="{url:'/SummaryReport/ApplicationList',title:'标签汇总分析',id:'53'}"><span>标签汇总分析</span></a>
                        </dd>
                    </dl>
                </li>

            </ul>
        </div>
    </div>
    <!-- 内容主体区域 -->
    <div class="layui-body" id="container">
        <div style="padding: 15px;"><i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop">&#xe63e;</i> 请稍等...</div>
    </div>
    <!-- 底部 -->
    <div class="layui-footer">
        @*<p>技术支持：上海峻鼎科技有限公司，联系方式：021-65710068，邮箱：40562534@qq.com</p>*@
    </div>
</div>
